package com.ruoyi.project.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 项目管理对象 am_project
 * 
 * @author ruoyi
 * @date 2020-07-28
 */

public class AmProject extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  项目表ID */
    private Long id;

    /** 项目编号 */
    private String projectCode;

    /** 项目名称 */
    @Excel(name = "项目名称")
    private String projectName;

    /** 所属招商部 */
    private Long ipdName;

    /** 所属招商部 */
    private String deptName;

    /** 详细地址 */
    @Excel(name = "详细地址")
    private String address;

    /** 坐标 */
    private String coordinate;

    /** 建筑面积（㎡） */
    @Excel(name = "建筑面积（㎡）")
    private BigDecimal area;

    /** 返佣比例(%) */
    private Long scale;

    /** 返佣金额 */
    private Long rebateAmount;

    /** 交付运营时间 */
    private Date deliverTime;

    /** 物业公司 */
    @Excel(name = "物业公司")
    private String property;

    /** 物业费(元/㎡·月) */
    @Excel(name = "物业费(元/㎡·月)")
    private BigDecimal propertyMoney;

    /** 停车位数量 */
    @Excel(name = "停车位数量")
    private String parking;

    /** 交付标准 1毛坯、2简装、3精装、4豪华 */

    private String deliveryStandard;

    @Excel(name = "交付标准")
    private String deliveryStandardValue;

    /** 项目类型 */
    @Excel(name = "项目类型")
    private String projectType;

    /** 标准层面积（㎡） */
    @Excel(name = "标准层面积")
    private BigDecimal standardLayerArea;

    /** 楼层层高/m */
    @Excel(name = "楼层层高/m")
    private BigDecimal standardLayerHeight;

    /** 项目简介 */
    @Excel(name = "项目简介")
    private String introduction;

    /** 图片链接 */
    private String image;

    /** 删除:1正常0删除 */
    private String del;

    /** 最后修改时间 */
    private Date modifiedTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setProjectCode(String projectCode) 
    {
        this.projectCode = projectCode;
    }

    public String getProjectCode() 
    {
        return projectCode;
    }
    public void setProjectName(String projectName) 
    {
        this.projectName = projectName;
    }

    public String getProjectName() 
    {
        return projectName;
    }
    public void setIpdName(Long ipdName) 
    {
        this.ipdName = ipdName;
    }

    public Long getIpdName() 
    {
        return ipdName;
    }
    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }
    public void setCoordinate(String coordinate) 
    {
        this.coordinate = coordinate;
    }

    public String getCoordinate() 
    {
        return coordinate;
    }
    public void setArea(BigDecimal area) 
    {
        this.area = area;
    }

    public BigDecimal getArea() 
    {
        return area;
    }
    public void setScale(Long scale) 
    {
        this.scale = scale;
    }

    public Long getScale() 
    {
        return scale;
    }
    public void setRebateAmount(Long rebateAmount) 
    {
        this.rebateAmount = rebateAmount;
    }

    public Long getRebateAmount() 
    {
        return rebateAmount;
    }
    public void setDeliverTime(Date deliverTime) 
    {
        this.deliverTime = deliverTime;
    }

    public Date getDeliverTime() 
    {
        return deliverTime;
    }
    public void setProperty(String property) 
    {
        this.property = property;
    }

    public String getProperty() 
    {
        return property;
    }
    public void setPropertyMoney(BigDecimal propertyMoney) 
    {
        this.propertyMoney = propertyMoney;
    }

    public BigDecimal getPropertyMoney() 
    {
        return propertyMoney;
    }
    public void setParking(String parking) 
    {
        this.parking = parking;
    }

    public String getParking() 
    {
        return parking;
    }
    public void setDeliveryStandard(String deliveryStandard)
    {
        this.deliveryStandard = deliveryStandard;
    }

    public String getDeliveryStandardValue() {
        return deliveryStandardValue;
    }

    public void setDeliveryStandardValue(String deliveryStandardValue) {
        this.deliveryStandardValue = deliveryStandardValue;
    }

    public String getDeliveryStandard()
    {
        return deliveryStandard;
    }
    public void setProjectType(String projectType) 
    {
        this.projectType = projectType;
    }

    public String getProjectType() 
    {
        return projectType;
    }
    public void setStandardLayerArea(BigDecimal standardLayerArea) 
    {
        this.standardLayerArea = standardLayerArea;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public BigDecimal getStandardLayerArea()
    {
        return standardLayerArea;
    }
    public void setStandardLayerHeight(BigDecimal standardLayerHeight) 
    {
        this.standardLayerHeight = standardLayerHeight;
    }

    public BigDecimal getStandardLayerHeight() 
    {
        return standardLayerHeight;
    }
    public void setIntroduction(String introduction) 
    {
        this.introduction = introduction;
    }

    public String getIntroduction() 
    {
        return introduction;
    }
    public void setImage(String image) 
    {
        this.image = image;
    }

    public String getImage() 
    {
        return image;
    }
    public void setDel(String del) 
    {
        this.del = del;
    }

    public String getDel() 
    {
        return del;
    }
    public void setModifiedTime(Date modifiedTime) 
    {
        this.modifiedTime = modifiedTime;
    }

    public Date getModifiedTime() 
    {
        return modifiedTime;
    }

    /**
     * 转码
     * @return
     */
    public static Long castIdByName(List<AmProject> projects , String projectName){
        if (null == projectName){
            return null;
        }
        if (null == projects || projects.size() == 0 ){
            return null;
        }
        for (AmProject project : projects) {
            if (project.getProjectName().equals(projectName)){
                return project.getId();
            }
        }
        return null;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("projectCode", getProjectCode())
            .append("projectName", getProjectName())
            .append("ipdName", getIpdName())
            .append("address", getAddress())
            .append("coordinate", getCoordinate())
            .append("area", getArea())
            .append("scale", getScale())
            .append("rebateAmount", getRebateAmount())
            .append("deliverTime", getDeliverTime())
            .append("property", getProperty())
            .append("propertyMoney", getPropertyMoney())
            .append("parking", getParking())
            .append("deliveryStandard", getDeliveryStandard())
            .append("projectType", getProjectType())
            .append("standardLayerArea", getStandardLayerArea())
            .append("standardLayerHeight", getStandardLayerHeight())
            .append("introduction", getIntroduction())
            .append("image", getImage())
            .append("del", getDel())
            .append("createTime", getCreateTime())
            .append("modifiedTime", getModifiedTime())
            .toString();
    }
}
